//
//  historyTableViewCell.m
//  EasyGo
//
//  Created by newhuidong on 16/1/30.
//  Copyright © 2016年 HuiDong. All rights reserved.
//

#import "historyTableViewCell.h"
#import "AFNetworking.h"
#import "URL.h"
#import "AppDelegate.h"
#import "Model.h"

@interface historyTableViewCell ()




@end

@implementation historyTableViewCell

- (void)awakeFromNib {
    
    self.workLine.adjustsFontSizeToFitWidth=YES;
    
    self.time.adjustsFontSizeToFitWidth=YES;
    
    
    self.statusLabel.layer.cornerRadius=3;
    
    self.statusLabel.layer.masksToBounds=YES;
    self.statusLabel.adjustsFontSizeToFitWidth=YES;
    
    

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
}

+(instancetype)historyWithTableView:(UITableView *)tableView{
    
    static NSString * identifer=@"cell";
    historyTableViewCell* cell=[tableView dequeueReusableCellWithIdentifier:identifer];
    if (cell==nil) {
        
        cell=[[[NSBundle mainBundle]loadNibNamed:@"historyTableViewCell" owner:nil options:nil]lastObject];
        
    }
    return cell;
}
-(void)setDic:(NSDictionary *)dic{
    
    _dic=dic;
    Model * model=[[Model alloc]initWithDic:dic];
    self.orderNumber.text=model.OrderNum;
    self.workLine.text=model.LineName;
    self.time.text=[NSString stringWithFormat:@"%@",model.EndTime];
}


@end
